<?php $mainbar = 'main';
 $pageId="page-order-pay";
?>

@extends('ios.pageIndex')

@section('page-content')
<div class="content-padded">
	 <h3>确认订单</h3>
	 <p style="line-height: 1.8">
	 请在60分钟之内支付，超时订单将自动关闭。
	 </p>
	 <p style="line-height: 1.8">
	 订单状态：等待支付<br>
	 订单日期： {{date('Y-m-d', strtotime($order->created_at))}}<br>
	 订单号： {{$order->id}}<br>
	 订单金额：¥{{number_format($order->freight + $order->product_total_price,2)}}
	 </p>
	 
	 <form method="post" action="{{URL::to('order/pay')}}" id="order-pay"  name="order-pay">
	 	<div class="list-block no-padded no-border font-normal">
		  <ul>
		    <li class="card-checkbox no">
		      <label class="label-checkbox item-content">
		        <!-- Checked by default -->
		        <input type="radio" name="pay_type" value="1" checked="checked">
		        <div class="item-media">
		          <i class="icon icon-form-checkbox"></i>
		        </div>
		        <div class="item-inner">
		          
		          <div class="item-title">
		          	@if(empty($wxparams))
		          	<i class="m-bank-icon alipay"></i>
		            @else
		            <img alt="" src="{{URL::to('assets/i/wx_logo.png')}}" width="150" style="margin-left: 1rem;">
		            @endif
		          </div>
		        </div>
		      </label>
		    </li>
		   </ul>
		 </div>
		 <input type="hidden" name="subject" value="{{$subject}}"/>
		<input type="hidden" name="out_trade_no" value="{{$order->id}}"/>
		<input type="hidden" name="total_fee" value="{{$order->freight + $order->product_total_price}}"/>
	    {{Form::token()}}
	    <button type="button" class="button button-big m-button" id="pay-button"
	    	data-url="{{URL::to('user/order',$order->id)}}">现在支付</button>
	 </form>
</div>

<script type="text/javascript">
<!--
	var wxparams;
@if(!empty($wxparams))
	wxparams = <?php echo $wxparams ?>
@endif
//-->
</script>

@stop